n = int(input())
a = list(map(int, input().split()))
res = 0
for i in range(n):
    if i % 2 == 0:
       res ^= a[i]
if res:
    print('Yes')
else:
    print('No')
